-- GENERATED SPELL FOR [Lost One Riftseeker] --


function spell0_762(pUnit, Event) --@Rift Beacon,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(9614,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_762', 1, 1)
end

function spell1_762(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_762', 3000, 1)
end

function spell2_762(pUnit, Event) --@Summon Imp,Self--
pUnit:FullCastSpellOnTarget(11939,pUnit)
pUnit:RegisterEvent('Sorts_762', 596, 1)
end

function Sorts_762(pUnit, Event)
local choix_sorts_762 = math.random(0, 2)
if choix_sorts_762 == 0 then
pUnit:RegisterEvent('spell0_762', 1, 1)
end
if choix_sorts_762 == 1 then
pUnit:RegisterEvent('spell1_762', 1, 1)
end
if choix_sorts_762 == 2 then
pUnit:RegisterEvent('spell2_762', 1, 1)
end
end

function mob762_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_762', math.random(1500, 3000), 1)
end

function mob762_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob762_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob762_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(762, 1, 'mob762_Action')
RegisterUnitEvent(762, 2, 'mob762_Leave')
RegisterUnitEvent(762, 3, 'mob762_Kill')
RegisterUnitEvent(762, 4, 'mob762_Die')
